package com.fgba.express.core.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fgba.express.core.dto.BaseDto;
import com.fgba.express.core.entity.BaseEntity;
import com.fgba.express.core.search.BaseSearch;

import java.util.List;

public interface ICrudService<T extends BaseEntity, D extends BaseDto,Q extends BaseSearch> extends IService<T> {

    /**
     * 分页查询
     * @param search search类
     * @param pageNum 当前页数
     * @param pageSize 每页条数
     * @return
     */
    IPage<D> getListPage(Q search, Integer pageNum, Integer pageSize);
    /**
     * 查询列表,需要根据条件查询时必须重写
     * @param search search类
     * @return 实体列表
     */
    List<D> getList(Q search);

}
